<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>链接和样式</title>
  <link href="../Styles/styles.css" rel="stylesheet" type="text/css"/>
</head>

<body>
  <h2 id="links">链接和 ID</h2>

  <p class="h2subheading">— 链接，注释和 ID —</p>

  <p>Sigil provides some helpful tools for creating ids and links which can make creating footnotes, endnotes, and cross-references easier.</p>
  <p>Sigil 提供了一些有用的工具来创建 ID 和链接，使创建脚注，尾注和交叉引用更加容易。</p>

  <h3 class="sigil_not_in_toc">插入ID</h3>

  <p>To mark text as a destination for a link you need to give it a name by inserting an anchor ID.</p>
  <p>要将文本标记为链接的目标，您需要通过插入锚点 ID 为其命名。</p>

  <p>Select the text you want to mark with an ID and click the button <img alt="" src="../Images/insert-id_22px.png"/> or select the menu item <span class="menuitem">Insert→ID</span>:</p>
  <p>选择要用 ID 标记的文本，然后单击按钮 <img alt="" src="../Images/insert-id_22px.png"/> 或选择菜单项 <span class="menuitem">插入→ID</span>：</p>

  <div class="image">
    <img alt="links-insert-id" src="../Images/links-insert-id.png"/>
  </div>

  <p>Type the name you want for this ID, e.g. footnote-1 (it must start with a letter).</p>
  <p>输入您想要此 ID 的名称，例如 footnote-1（必须以字母开头）。</p>

  <p>To edit the ID, select the word or click somewhere in the word then click the <img alt="" src="../Images/insert-id_22px.png"/>button again.</p>
  <p>要编辑 ID，请选择单词或单击单词中的某个位置，然后再次单击 <img alt="" src="../Images/insert-id_22px.png"/> 按钮。</p>

  <p>The ID is actually inserted using HTML code like this:</p>
  <p>该ID实际上是使用如下 HTML 代码插入的：</p>

  <pre class="example">&lt;a id="footnote-1"&gt;Footnote 1&lt;/a&gt;</pre>

  <div class="tip">
    <p class="tiptext">You cannot use identical IDs in the same file.</p>
    <p class="tiptext">您不能在同一文件中使用相同的 ID。</p>
  </div>

  <p>If you click on the drop-down arrow you will see a list of existing IDs for the file for reference.</p>
  <p>如果单击下拉箭头，将看到该文件的现有 ID 列表，以供参考。</p>

  <p>To delete an ID you will need to edit the HTML code in Code View to remove the tags completely.</p>
  <p>要删除 ID，您需要在代码视图中编辑 HTML 代码以完全删除标签。</p>

  <div class="tip">
    <p class="tiptext">To identify IDs in your book you can search in Code View. Or you can highlight them in Preview in color by adding the following CSS temporarily to your stylesheet:</p>
    <p class="tiptext">要在您的书中标识 ID，您可以在“代码视图”中搜索。或者，您可以通过将以下 CSS 临时添加到样式表中，以彩色预览突出显示它们：</p>

    <pre>[id class!=sigil_index_marker] { color:#00ff00; }</pre>
  </div>

  <h3 class="sigil_not_in_toc">插入链接</h3>

  <p>To create a link to another part of the document select the text you want to link and then click the button <img alt="" src="../Images/insert-hyperlink_22px.png"/> or select the menu item <span class="menuitem">Insert→Link</span>:</p>
  <p>要创建指向文档另一部分的链接，请选择要链接的文本，然后单击按钮 <img alt="" src="../Images/insert-hyperlink_22px.png"/> 或选择菜单项 <span class="menuitem">插入→链接</span>：</p>

  <div class="image">
    <img alt="links-insert-hyperlink" src="../Images/links-insert-hyperlink.png"/>
  </div>

  <p>You will be given a list of valid targets in the EPUB that you can select (double-click one or select and click <span class="buttonbox">OK</span>). A valid target in the EPUB is any filename, any anchor IDs that have been created, or even any images. The list will be sorted so that targets in the current file are listed first, followed by all remaining files in book order.</p>
  <p>您将在 EPUB 中获得一个可以选择的有效目标列表（双击一个目标，或者选择并单击 <span class="buttonbox">确定</span>）。EPUB 中的有效目标是任何文件名，已创建的任何锚ID甚至任何图像。该列表将进行排序，以便首先列出当前文件中的目标，然后按书籍顺序列出所有剩余文件。</p>

  <p>To edit a link, select the text again or move your cursor in the text using the arrow keys (you can’t click in it or you will be taken to the link) and then click the button <img alt="" src="../Images/insert-hyperlink_22px.png"/>. The link will be highlighted in the list if it is valid.</p>
  <p>要编辑链接，请再次选择文本或使用箭头键在文本中移动光标（您无法单击它，否则将进入该链接），然后单击按钮 <img alt="" src="../Images/insert-hyperlink_22px.png"/>。如果有效，链接将在列表中突出显示。</p>

  <p>You can also enter any URL you want as a target for the link (e.g. to point to web sites) by typing the entry in the Target box.</p>
  <p>您还可以通过在“目标”框中键入条目，输入想要用作链接目标的任何 URL（例如，指向网站）。</p>

  <h3 class="sigil_not_in_toc">导航链接</h3>

  <p>To go to a link in Preview just click on it.</p>
  <p>要转到预览中的链接，只需单击它。</p>

  <p>To go to a link in Code View, hold the <span class="shortcut">Ctrl</span> key down while clicking on the HTML opening tag.</p>
  <p>要转到代码视图中的链接，请在单击 HTML 开头标记的同时按下 <span class="shortcut">Ctrl</span> 键。</p>

  <div class="tip">
    <p class="tiptext">Ctrl-clicking on text will take you to the link if the text is a link, or it will take you to the CSS style defined for the tag if the text is just a tag.</p>
    <p class="tiptext">如果文本是链接，则按住 Ctrl 键单击文本将带您进入链接，如果文本只是标签，则将带您进入为标签定义的 CSS 样式。</p>
  </div>

  <p>To go back to where you clicked the link, just click the Back button <img alt="" src="../Images/back-to-link-style_22px.png"/> or select the menu item <span class="menuitem">Go Back to Link or Style</span>.</p>
  <p>要返回单击链接的位置，只需单击“后退”按钮 <img alt="" src="../Images/back-to-link-style_22px.png"/> 或选择菜单项  <span class="menuitem">返回链接或样式</span>。</p>
</body>
</html>